fetcher: Clear all data for session in session thread
authorColin Walters <walters@verbum.org>
Fri, 8 Jul 2016 14:15:47 +0000 (10:15 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 8 Jul 2016 18:38:11 +0000 (18:38 +0000)
commit5d21650ea5fcf42a828c79e0373be73284fcf69c
tree274f0e038e674b197a37ee7f87cf972e7da9bbcc
parentb4c15209e846aaf3bfdbf12eddea3dd1d9a46226
fetcher: Clear all data for session in session thread

Conceptually the session thread owns the session, so let's clear out
everything predictably there, rather than sometimes having it happen
on the main thread.

Also, this moves up clearing the pending/outstanding queues *before*
we unreference the session, since conceptually they need to reference
it as well.

Based on a patch from: Matthew Barnes <mbarnes@redhat.com>

Closes: #383
Approved by: mbarnes
src/libostree/ostree-fetcher.c